<template>
	<view class="contont" style="background-color: #F5F5F5;">
		<view class="infromid">
			<view style="height: 50%;width: 100%;border-bottom: 1px solid #F5F5F5;" class="cent" >
					<text style="font-size: 15px;margin-left: 30rpx;">姓名</text>
					<input type="text"  placeholder="姓名" v-model="code"  style="font-size: 15px;width: 30%;margin-right: 15px;text-align: right;" disabled="disabled"/>
			</view>
			<view style="height: 50%;width: 100%; " class="cent" >
					<text style="font-size: 15px;margin-left: 30rpx;">身份证号</text>
					<input type="text"  placeholder="身份证号" maxlength="18" v-model="codes"  style="font-size: 15px;width: 50%;margin-right: 15px;text-align: right;" disabled="disabled"/>
			</view>
		</view>
		<view class="infromeid">
			<view style="height: 100%;width: 100%;flex-direction: column;display: flex;overflow: hidden;">
				<view style="display: flex;align-items: center;justify-content:space-between;" >
						<view style="padding-top: 15px;margin-left: 15px;">驾驶证照片</view>
					<view style="padding-top: 15px;margin-right: 15px;">
						认证状态：
						<text v-if="driver==1" style="color: #002CFF;">审核中</text>
						<text v-if="driver==2" style="color: #002CFF;">认证失败</text>
						<text v-if="driver==3" style="color: #002CFF;">已过期 </text>
						<text v-if="driver==4" style="color: #002CFF;">快过期</text>
						<text v-if="driver==5" style="color: #002CFF;">已认证</text>
						<text v-if="driver==6" style="color: #002CFF;">待认证</text>
					</view>
				</view>
				
				<image :src="imgs" mode="" style="margin-top: 15px;margin-left: 16px; padding-bottom: 20px;" ></image>
			</view>
		</view>
		<button class="" @click="but">修改</button>
	</view>
</template>

<script>
	import {ajax} from '../../api.js'
	export default {
		data() {
			return {
				imaged:[],
				name:"",
				nameid:"",
				driver:"",
				code:"",
				codes:"",
				imgs:"../../static/img/img_shangchuanxiao@2x.png"
			}
		},

	onShow() {
		var that=this
		uni.showLoading({
		    title: '加载中！'
		});
		ajax({
			url:"/v1/appdriver/user/profile",
			success(res){
				
				uni.hideLoading()
				that.code=res.data.message.username
				that.codes=res.data.message.idnumber
				that.imgs="https://www.uhuoda.com/"+res.data.message.drivingnumaphoto
				that.driver=res.data.message.driverStatus
			}
		})
	},
		methods: {
	
			but(){
				var that=this
				uni.navigateTo({
					url:"../information/information?id=1&&username="+that.code+"&idnumber="+that.codes
				})
			},
	
		}
	}
</script>

<style>
	page{
		height: 100%;
	}
.infromid{
	width:355px;
	height:111px;
	background:rgba(255,255,255,1);
	border-radius:8px;
	margin-top: 10px;
}
 .infromeid{
	width:355px;
	height:285px;
	background:rgba(255,255,255,1);
	border-radius:8px;
	margin-top: 10px;
}
button{
	width:355px;
	height:44px;
	background:rgba(4,42,88,1);
	border-radius:8px;
	color: #FFFFFF;
	margin-top: 120px;
}
</style>
